package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ztgf.commodity.models.dto.CommodityAdvisoryPriceDTO;
import com.ztgf.commodity.models.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 询价表映射
 *
 * @author chenyu.wang
 * @Date 2020-05-27 11:06:36
 */
@Mapper
public interface CommodityAdvisoryPriceMapper extends BaseMapper<CommodityAdvisoryPriceDTO> {

    /**
     * description: 根据shopid查询询价结果
     * param: [shopId]
     * author: chenyu.wang
     * date: 2020-07-14
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityAdvisoryPriceVO>
     */
    CommodityAdvisoryPriceVO queryInquiryResult(@Param("shopId") Long shopId);

    /**
     * description: 查询询价结果商品
     * param: [areaId, categoryId, brandId]
     * author: chenyu.wang
     * date: 2020-07-14
     * return: java.util.List<com.ztgf.commodity.models.vo.CommodityAdvisoryGoodsVO>
     */
    List<CommodityAdvisoryGoodsVO> queryInquiryGoods(@Param("item") CommodityAdvisoryPriceVO vo, @Param("sort") Integer sort);

    /*
     * @description:查询询价套餐商品
     * @author: chenyu.wang
     * @date: 2020-08-28
     */
    List<CommodityAdvisoryGoodsVO> queryComboGoods(@Param("item") CommodityAdvisoryPriceVO vo, @Param("sort") Integer sort);

    /*
     * @description:所有最终级类目
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    List<CommodityAllFinallyCategoryVO> queryAllFinallyCategory();

    /*
     * @description:查询分类规格关联
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    List<SpecificationCategoryVO> getSpecificationByCategory(@Param("id") Long id, @Param("condition") String condition);

    /*
     * @description:查询规格属性
     * @author: chenyu.wang
     * @date: 2020-08-10
     * @param:
     * @return:
     */
    List<CommodityAttrVO> getAttributesList(@Param("id") Long id);

    /*
     * @description:上传询价文件后的查询条件
     * @author: chenyu.wang
     * @date: 2020-08-12
     * @param:
     * @return:
     */
    List<CommodityAdvisoryGoodsVO> queryExcelAdvisoryPrice(@Param("item") CommodityAdvisoryExcelVO vo);
}
